package main

import "fmt"

func main()  {

	// copy 不涉及指针 ，重新创建个新的内存空间

	s1 := []int{1,2,3,4,5,6}
	s2 := s1
	var s3 = make([]int, 6, 8)
	copy(s3, s1)
	s1[0] = 100
	s3[1] = 1000
	fmt.Println(s1, s2, s3)
	// result [100 2 3 4 5 6] [100 2 3 4 5 6] [1 1000 3 4 5 6]


}